1
프롬프팅의 진화: 기본 지시에서 구조적 사고로
AI012Lesson 3
00:00

프롬프팅 계층 구조: 지시에서 논리로

프롬프팅은 단순한 명령 기반 입력에서 복잡한 사고 아키텍처모델의 내부 처리 경로를 안내하는 방식으로 진화했습니다.

핵심 개념

  • 제로샷 프롬프팅:예시 없이 작업 설명만 제공 (예: "이것을 프랑스어로 번역해 주세요").
  • 피샷 프롬프팅:"연습 예제"(입력-출력 쌍)를 사용하여 레이블 공간과 원하는 형식을 정의합니다.
  • 사고의 흐름(코트):모델이 중간 사고 단계를 생성하도록 유도하는 프롬프팅 기법입니다.
  • 유출 성질:복잡한 사고 능력은 명시적으로 프로그래밍되지 않았지만, 보통 100억 이상 파라미터를 가진 모델에서 "자발적으로 나타납니다."

사고 방식의 전환

  1. 지시 수행:입력에서 출력으로의 직접 매핑.
  2. 맥락 내 학습:제공된 예제(피샷)로부터 패턴을 학습합니다.
  3. 논리적 분해:문제를 순차적인 단계로 나누는 것(코트).
  4. 과정 감시:최종 답변보다 "사고 과정"의 정확성을 우선시합니다(오픈애이 오1에서 확인됨).
핵심 통찰
피샷 상황에서 모델의 성능은 예제의 수보다 레이블 분포와 예제의 관련성에 매우 민감하게 반응합니다.
prompting_strategies.py
TERMINALbash — 80x24
> Ready. Click "Run" to execute.
>
Question 1
Which method relies on providing "demonstrations" to guide the model?
Zero-shot prompting
Few-shot prompting
Chain-of-Thought
Fine-tuning
Question 2
True or False: Chain-of-Thought reasoning is a capability found in almost all AI models regardless of size.
True
False
Challenge: Optimizing Logic Puzzles
Scenario: Optimize a prompt for a model that is struggling with a logic puzzle.
You are using an LLM to solve the following puzzle: "A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost?"

Currently, you are passing the prompt exactly as written above, and the model incorrectly answers "$0.10".
Task 1
Identify if the current prompt is Zero-shot or Few-shot.
Solution:
The current prompt is Zero-shot because it provides the task description without any prior examples or demonstrations of similar solved puzzles.
Task 2
Inject the Zero-shot CoT trigger phrase to improve reasoning accuracy. Rewrite the prompt.
Solution:
"A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost? Let's think step by step:"